﻿{
    "#Entities": [

        {
            "Name": "Category",
            "Keys": [ "CategoryId" ]

        },
        {
            "Name": "Product",
            "Keys": [ "ProductId" ],
            "Relations": [
                {
                    "Name": "Category",
                    "Keys": [ "CategoryId" ],
                    "RelationType": "1:N"
                }
            ]
        },
        {
            "Name": "Client",
            "Keys": [ "ClientId" ],
            "Relations": [
                {
                    "Name": "Product",
                    "Keys": [ "ProductId" ],
                    "RelationType": "M:N"

                }
            ]
        }
    ],

    "#+Category": [
        {
            "CategoryId": 1,
            "Title": "Category 01"
        },
        {
            "CategoryId": 2,
            "Title": "Category 02"
        },
        {
            "CategoryId": 3,
            "Title": "Category 03"
        }

    ],

    "#+Product": [
        {
            "ProductId": 1,
            "CategoryId": 1

        },
        {
            "ProductId": 2,
            "CategoryId": 2

        },
        {
            "ProductId": 3,
            "CategoryId": 1

        },
        {
            "ProductId": 4,
            "CategoryId": 2

        },
        {
            "ProductId": 5,
            "CategoryId": 3

        }

    ],

    "#+Client": [
        {
            "ClientId": 1,
            "Title": "Client 01",
            "ProductId": [ 1, 2, 3, 4 ]
        },
        {
            "ClientId": 2,
            "Title": "Client 02",
            "ProductId": [ 1, 2, 3, 4 ]
        },
        {
            "ClientId": 3,
            "Title": "Client 03",
            "ProductId": [ 1, 2, 3, 4 ]
        }

    ],

    "#-Category": [
        {
            "ConditionOperator": "=",
            "CategoryId": 1,
            "Operator": "OR"
        },
        {
            "ConditionOperator": "=",
            "CategoryId": 2,
            "Operator": "OR"
        }
       

    ],

    "#?Category": [
        {
            "ConditionOperator": "=",
            "CategoryId": 1,
            "Operator": "OR"
        },
        {
            "ConditionOperator": "=",
            "CategoryId": 2,
            "Operator": "OR"
        },
        {
            "ConditionOperator": "=",
            "CategoryId": 3,
            "Operator": "OR"
        }

    ],
    
    "#?Product": [
        {
            "ConditionOperator": ">=",
            "ProductId": 3,
            "Operator": "OR"
        }
    ]

}